Method and apparatus for processing digital audio signal

ABSTRACT

A digital audio signal has a sequence of samples. Extreme values in an audio waveform represented by the digital audio signal are detected. The extreme values include a maximum value and a minimum value. An audio frequency represented by the digital audio signal is detected in response to the number of samples between two temporally-adjacent extreme-corresponding samples. A difference between each extreme value and a value of a sample which immediately precedes the present extreme-corresponding sample is calculated. The calculated differences are multiplied by selected one of predetermined coefficients to get corrective values respectively. A decision is made as to whether or not the detected audio frequency is in one selected from predetermined frequency bands. When the detected audio frequency is in the selected frequency band, a corresponding corrective value is added to the maximum value and a corresponding corrective value is subtracted from the minimum value.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a method of processing a digital audio signal.In addition, this invention relates to an apparatus for processing adigital audio signal. Furthermore, this invention relates to a computerprogram for processing a digital audio signal.

2. Description of the Related Art

According to the CD standards, an analog audio signal is converted intoa digital audio signal by sampling and quantizing processes with asampling frequency fs of 44.1 kHz and a quantization bit number of 16.Generally, a sampling frequency and a quantization bit number are basicfactors which determine the quality of audio contents represented by aresultant digital audio signal. A higher sampling frequency and agreater quantization bit number provide a better audio quality. In thecase where a sampling frequency fs is 44.1 kHz, signal components havingfrequencies of 22.05 kHz or higher are cut off.

To improve audio quality, the DVD video standards and the DVD audiostandards use a quantization bit number of 24 and a sampling frequencyfs of 48 kHz, 96 kHz, or 192 kHz.

It is known to re-quantize and up-sample a digital audio signal of theCD standards into a digital audio signal of the DVD video standards orthe DVD audio standards which corresponds to a sampling frequency of 48kHz and a quantization bit number of 24. In this case, the audiowaveform represented by the DVD digital audio signal is basicallyidentical with that represented by the original CD digital audio signal,and the DVD digital audio signal also lacks signal componentsrepresenting audio frequencies of 22.05 kHz or higher. Therefore, inthis case, an improved audio quality can not be provided.

A brief explanation will now be given of conceivable systems which arenot prior art against this invention. The conceivable systems aredesigned to add high-audio-frequency signal components to an originaldigital audio signal to get a modified digital audio signalrepresentative of audio contents with enhanced presence in auditorysensation. In the conceivable systems, the addition ofhigh-audio-frequency signal components to the original digital audiosignal is independent of the audio frequency represented by the originaldigital audio signal. Therefore, it is difficult to addhigh-audio-frequency signal components to only components of theoriginal digital audio signal which represent audio frequencies in adesired band or a limited band.

SUMMARY OF THE INVENTION

It is a first object of this invention to provide an improved method ofprocessing a digital audio signal.

It is a second object of this invention to provide an improved apparatusfor processing a digital audio signal.

It is a third object of this invention to provide an improved computerprogram for processing a digital audio signal.

A first aspect of this invention provides a method of processing adigital audio signal having a sequence of samples. The method comprisesthe steps of detecting extreme values in an audio waveform representedby the digital audio signal, the detected extreme values including adetected maximum value and a detected minimum value; counting samplesbetween a sample corresponding to first one of the detected extremevalues and a sample corresponding to second one of the detected extremevalues to get a count result; detecting an audio frequency representedby the digital audio signal in response to the count result; calculatinga difference between each of the detected extreme values and a value ofa sample which immediately precedes a sample corresponding to thepresent detected extreme value; selecting one from predeterminedfrequency bands different from each other; selecting one frompredetermined coefficients different from each other; multiplying thecalculated differences by the selected coefficient to get correctivevalues respectively; deciding whether or not the detected audiofrequency represented by the digital audio signal is in the selectedfrequency band; and when it is decided that the detected audio frequencyis in the selected frequency band, adding, to the detected maximumvalue, corresponding one of the corrective values, and subtracting, fromthe detected minimum value, corresponding one of the corrective values.

A second aspect of this invention is based on the first aspect thereof,and provides a method wherein the predetermined coefficients are smallerthan 1.0.

A third aspect of this invention provides an apparatus for processing adigital audio signal having a sequence of samples. The apparatuscomprises means for detecting extreme values in an audio waveformrepresented by the digital audio signal, the detected extreme valuesincluding a detected maximum value and a detected minimum value; meansfor counting samples between a sample corresponding to first one of thedetected extreme values and a sample corresponding to second one of thedetected extreme values to get a count result; means for detecting anaudio frequency represented by the digital audio signal in response tothe count result; means for calculating a difference between each of thedetected extreme values and a value of a sample which immediatelyprecedes a sample corresponding to the present detected extreme value;means for selecting one from predetermined frequency bands differentfrom each other; means for selecting one from predetermined coefficientsdifferent from each other; means for multiplying the calculateddifferences by the selected coefficient to get corrective valuesrespectively; means for deciding whether or not the detected audiofrequency represented by the digital audio signal is in the selectedfrequency band; and means for, when it is decided that the detectedaudio frequency is in the selected frequency band, adding, to thedetected maximum value, corresponding one of the corrective values, andsubtracting, from the detected minimum value, corresponding one of thecorrective values.

A fourth aspect of this invention is based on the third aspect thereof,and provides an apparatus wherein the predetermined coefficients aresmaller than 1.0.

A fifth aspect of this invention provides a computer program forenabling a computer to execute steps of processing a digital audiosignal having a sequence of samples. The steps comprise detectingextreme values in an audio waveform represented by the digital audiosignal, the detected extreme values including a detected maximum valueand a detected minimum value; counting samples between a samplecorresponding to first one of the detected extreme values and a samplecorresponding to second one of the detected extreme values to get acount result; detecting an audio frequency represented by the digitalaudio signal in response to the count result; calculating a differencebetween each of the detected extreme values and a value of a samplewhich immediately precedes a sample corresponding to the presentdetected extreme value; selecting one from predetermined frequency bandsdifferent from each other; selecting one from predetermined coefficientsdifferent from each other; multiplying the calculated differences by theselected coefficient to get corrective values respectively; decidingwhether or not the detected audio frequency represented by the digitalaudio signal is in the selected frequency band; and when it is decidedthat the detected audio frequency is in the selected frequency band,adding, to the detected maximum value, corresponding one of thecorrective values, and subtracting, from the detected minimum value,corresponding one of the corrective values.

A sixth aspect of this invention provides an apparatus for processing adigital audio signal. The apparatus comprises first means for detectingan extreme in an audio waveform represented by the digital audio signal;second means for detecting a local audio frequency represented by thedigital audio signal; third means for deciding whether or not the localaudio frequency detected by the second means is in a limited frequencyband; fourth means for, when the third means decides that the localaudio frequency is in the limited frequency band, emphasizing theextreme detected by the first means; and fifth means for, when the thirdmeans decides that the local audio frequency is not in the limitedfrequency band, keeps unchanged the extreme detected by the first means.

A seventh aspect of this invention is based on the sixth aspect thereof,and provides an apparatus further comprising sixth means for changingthe limited frequency band.

An eighth aspect of this invention is based on the sixth aspect thereof,and provides an apparatus further comprising sixth means for changing adegree of the emphasis by the fourth means.

A ninth aspect of this invention is based on the sixth aspect thereof,and provides an apparatus further comprising sixth means for keepingunchanged the audio waveform except for the extreme.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a time-domain diagram of the audio waveforms represented bydigital signals in a conceivable system which is not prior art againstthis invention.

FIG. 2 is a block diagram of a digital-audio-signal processing apparatusaccording to a first embodiment of this invention.

FIG. 3 is an operation flow diagram of a high-frequency-signal generatorin FIG. 2.

FIG. 4 is a time-domain diagram of an example of the values representedby successive digital-signal samples which include maximum and minimumvalues.

FIG. 5 is a time-domain diagram of an example of the values representedby successive digital-signal samples which include a maximum value.

FIG. 6 is a time-domain diagram of an example of the values representedby successive digital-signal samples which include a correction-resultmaximum value.

FIG. 7 is a time-domain diagram of an example of the values representedby successive digital-signal samples which include a correction-resultminimum value.

FIG. 8 is a time-domain diagram of the audio waveforms represented bydigital signals in the apparatus of FIG. 2.

FIG. 9 is a flowchart of a segment of a control program for at least apart of a waveform shaping circuit in FIG. 2.

FIG. 10 is a block diagram of a digital-audio-signal processingapparatus according to a second embodiment of this invention.

FIG. 11 is a flowchart of a segment of a control program for a signalprocessing device in FIG. 10.

DETAILED DESCRIPTION OF THE INVENTION

A conceivable system for processing a digital audio signal which is notprior art against this invention will be explained below for a betterunderstanding of this invention.

The conceivable system adds high-audio-frequency signal components to aninput digital audio signal, and thereby processes the input digitalaudio signal into an output digital audio signal. With reference to FIG.1, the input digital audio signal has a sequence of samples representingsignal levels or signal values which vary as steps “B”. There are 4samples in a time interval 4 PSA equal to 4 times one sampling periodPSA related to the input digital audio signal. The input digital audiosignal represents an effective audio waveform “A”.

The conceivable system detects every extreme value in the effectiveaudio waveform “A” represented by the input digital audio signal. Here,every extreme value means every maximum value and every minimum value(every local maximum value and every local minimum value), that is,every peak and every valley. Furthermore, the conceivable system detectsthe middle value between every extreme value and a subsequent extremevalue (for example, every maximum value and a subsequent minimum value).To enhance the clarity of audio contents, the conceivable systemcorrects successive samples starting from the sample representing theextreme value (for example, the maximum value) and ending at the samplerepresenting the subsequent extreme value (for example, the subsequentminimum value). Specifically, the conceivable system calculatescorrective values for the samples respectively. The corrective value forevery sample depends on the signal level represented by the sample. Theconceivable system adds the corrective values to the signal levelsrepresented by the related samples existing in a time range where thevalues of the samples are greater than the middle value. On the otherhand, the conceivable system subtracts the corrective values from thesignal levels represented by the related samples existing in a timerange where the values of the samples are smaller than the middle value.The correction of the samples causes the output digital audio signalwhich represents an effective audio waveform “C” having emphasized peaksand valleys relative to those in the original effective audio waveform“A” (see FIG. 1). The emphasized peaks and valleys mean the addition ofhigh-audio-frequency signal components to the input digital audiosignal.

In the conceivable system, the correction of samples is independent ofthe audio frequency represented by the input digital audio signal.Therefore, it is difficult to add high-audio-frequency signal componentsto only components of the input digital audio signal which representaudio frequencies in a desired band or a limited band.

FIRST EMBODIMENT

FIG. 2 shows a digital-audio-signal processing apparatus according to afirst embodiment of this invention. The apparatus of FIG. 2 includes awaveform shaping circuit 1, a frequency band selector 7, and acoefficient selector 8. The frequency band selector 7 and thecoefficient selector 8 are connected with the waveform shaping circuit1.

The waveform shaping circuit 1 includes an input port 2, a delay circuit3, a high-frequency-signal generator 4, an adder 5, and an output port6. The input port 2 is connected to the input terminals of the delaycircuit 3 and the high-frequency-signal generator 4. The output terminalof the delay circuit 3 is connected to a first input terminal of theadder 5. The output terminal of the high-frequency-signal generator 4 isconnected to a second input terminal of the adder 5. Thehigh-frequency-signal generator 4 has control terminals connected to thefrequency band selector 7 and the coefficient selector 8 respectively.The output terminal of the adder 5 is connected with the output port 6.

Preferably, the frequency band selector 7 and the coefficient selector 8include switches which can be operated by a user.

The input port 2 in the waveform shaping circuit 1 receives an inputdigital audio signal having a sequence of samples. The input digitalaudio signal relates to a predetermined sampling frequency equal to, forexample, 48 kHz, 96 kHz, or 192 kHz. Every sample in the input digitalaudio signal has a predetermined number of bits, for example, 24 bits.In other words, the input digital audio signal has a predeterminedquantization bit number equal to, for example, 24. The input port 2passes the input digital audio signal to the delay circuit 3 and thehigh-frequency-signal generator 4.

The high-frequency-signal generator 4 produces a corrective digitalsignal in response to the input digital audio signal and control signalsfed from the frequency band selector 7 and the coefficient selector 8.The corrective digital signal represents high audio frequencies. Thecorrective digital signal has a sequence of samples corresponding toextreme-representing samples in the input digital audio signal. Thehigh-frequency-signal generator 4 outputs the corrective digital signalto the adder 5.

The delay circuit 3 delays the input digital audio signal by apredetermined time. The delay circuit 3 outputs the delay-result digitalaudio signal to the adder 5. The delay circuit 3 implements timingadjustment which enables corresponding samples in the corrective digitalsignal and the corrective digital signal to simultaneously reach theadder 5.

The device 5 adds the corrective digital signal to the delay-resultdigital audio signal, and thereby corrects the delay-result digitalaudio signal into an output digital audio signal (a correction-resultdigital audio signal). The adder 5 feeds the output digital audio signalto the output port 6. The output port 6 passes the output digital audiosignal to an external device.

The high-frequency-signal generator 4 responds to the control signal fedfrom the frequency band selector 7. The high-frequency-signal generator4 stores data indicating a plurality of predetermined frequency bandswhich differ from each other. The high-frequency-signal generator 4selects one from the predetermined frequency bands in response to thecontrol signal fed from the frequency band selector 7. By operating thefrequency band selector 7, the user can decide which of thepredetermined frequency bands should be selected. Thehigh-frequency-signal generator 4 detects the present audio frequency(present local audio frequency) represented by the input digital audiosignal. The high-frequency-signal generator 4 determines whether or notthe detected present audio frequency is in the selected frequency band.When it is determined that the detected present audio frequency is notin the selected frequency band, the high-frequency-signal generator 4outputs a null digital signal or a “0” digital signal to the adder 5 asa disabled corrective digital signal. In this case, the delay-resultdigital audio signal propagates through the adder 5 without beingprocessed. Then, the delay-result digital audio signal propagatesthrough the output port 6 before reaching the external device as anoutput digital audio signal. On the other hand, when it is determinedthat the detected present audio frequency is in the selected frequencyband, the high-frequency-signal generator 4 outputs an enabledcorrective digital signal to the adder 5. In this case, the device 5adds the corrective digital signal to the delay-result digital audiosignal, and thereby corrects the delay-result digital audio signal intoan output digital audio signal. The adder 5 feeds the output digitalaudio signal to the output port 6. Then, the output port 6 passes theoutput digital audio signal to the external device.

The high-frequency-signal generator 4 responds to the control signal fedfrom the coefficient selector 8. The high-frequency-signal generator 4stores data indicating a plurality of predetermined coefficients whichdiffer from each other. The high-frequency-signal generator 4 selectsone from the predetermined coefficients in response to the controlsignal fed from the coefficient selector 8. By operating the coefficientselector 8, the user can decide which of the predetermined coefficientsshould be selected. When it is determined that the detected presentaudio frequency represented by the input digital audio signal is in theselected frequency band, the high-frequency-signal generator 4 producesan enabled corrective digital signal in response to the selectedcoefficient. The degree of the effectiveness of the corrective digitalsignal is decided by the selected coefficient. As previously mentioned,the high-frequency-signal generator 4 outputs the produced correctivedigital signal to the adder 5.

In more detail, the high-frequency-signal generator 4 detects everyextreme value in the audio waveform represented by the input digitalaudio signal. Here, every extreme value means every maximum value andevery minimum value (every local maximum value and every local minimumvalue), that is, every peak and every valley. The high-frequency-signalgenerator 4 identifies every sample in the input digital audio signalwhich represents an extreme value (a maximum value or a minimum value).Also, the high-frequency-signal generator 4 identifies every sample inthe input digital audio signal which immediately precedes anextreme-representing sample. Furthermore, the high-frequency-signalgenerator 4 detects the value represented by every sample in the inputdigital audio signal which immediately precedes an extreme-representingsample. The high-frequency-signal generator 4 calculates the differencebetween every extreme value and the value represented by the sampleimmediately preceding the extreme-representing sample. When it isdetermined that the detected present audio frequency represented by theinput digital audio signal is in the selected frequency band, thehigh-frequency-signal generator 4 multiplies the calculated differencewith the selected coefficient to get a corrective value for theextreme-representing sample. The high-frequency-signal generator 4produces an enabled corrective digital signal in accordance with thecorrective value. The high-frequency-signal generator 4 outputs theproduced corrective digital signal to the adder 5. The correctivedigital signal outputted to the adder 5 affects onlyextreme-representing samples in the delay-result digital audio signal.In other words, the corrective digital signal is ineffective withrespect to samples other than extreme-representing samples. Therefore,only extreme values (maximum values and minimum values) in the audiowaveform represented by the delay-result digital audio signal arecorrected. The correction-result extreme values are reflected in theaudio waveform represented by the output digital audio signal.

Preferably, the high-frequency-signal generator 4 includes amicroprocessor unit (MPU), a digital signal processor (DSP), or asimilar device which operates in accordance with a control program (acomputer program) stored in its internal memory.

FIG. 3 is a function flow diagram or an operation flow diagram of thehigh-frequency-signal generator 4. With reference to FIG. 3, anextreme-value detection block 41 accepts the input digital audio signal.The extreme-value detection block 41 detects every maximum value andevery minimum value (that is, every peak and every valley) in the audiowaveform represented by the input digital audio signal. The maximum andminimum values are also referred to as the extreme values. Theextreme-value detection block 41 identifies samples in the input digitalaudio signal which represent the detected maximum values and thedetected minimum values. The identified samples are referred to as theextreme-representing samples, or the maximum-representing samples andthe minimum-representing samples. The extreme-value detection block 41informs a frequency detection block 42 of the extreme-representingsamples. In addition, the extreme-value detection block 41 passes theinput digital audio signal to the frequency detection block 42. Theextreme-value detection block 41 informs a difference detection block 43of the extreme values and the extreme-representing samples. In addition,the extreme-value detection block 41 passes the input digital audiosignal to the difference detection block 43.

The frequency detection block 42 repetitively calculates the timeinterval between two temporally-adjacent extreme-representing samples.Specifically, the frequency detection block 42 counts samples betweentwo temporally-adjacent extreme-representing samples. The frequencydetection block 42 calculates, from the latest count result, the presentaudio frequency (present local audio frequency) represented by the inputdigital audio signal. The frequency detection block 42 informs anagreement detection block 46 of the present audio frequency representedby the input digital audio signal.

The difference detection block 43 calculates the difference betweenevery extreme value and a value represented by a sample immediatelypreceding the extreme-representing sample. Thus, the differencedetection block 43 calculates the difference between every maximum valueand a value represented by a sample immediately preceding themaximum-representing sample, and also the difference between everyminimum value and a value represented by a sample immediately precedingthe minimum-representing sample. The difference detection block 43informs a multiplication block 47 of every calculated difference.

A frequency band table 44 provided in a memory stores data indicating aplurality of predetermined frequency bands different from each other.For example, the predetermined frequency bands are equal to respectivebands into which the audio frequency range of the input digital audiosignal is divided. The predetermined frequency bands may partiallyoverlap each other. One is selected from the predetermined frequencybands in response to the control signal fed from the frequency bandselector 7. The selected frequency band is notified to the agreementdetection block 46.

A coefficient table 45 provided in a memory stores data indicating aplurality of predetermined coefficients different from each other. Thepredetermined coefficients are in the range between 0 and 1.0 exclusive.Thus, the predetermined coefficients are smaller than 1.0. One isselected from the predetermined coefficients in response to the controlsignal fed from the coefficient selector 8. The selected coefficient isnotified to the multiplication block 47.

The agreement detection block 46 decides whether or not the presentaudio frequency represented by the input digital audio signal is in theselected frequency band. Only when it is decided that the present audiofrequency is in the selected frequency band, the agreement detectionblock 46 generates a correction command. The agreement detection block46 informs an output control block 48 of the generated correctioncommand.

The multiplication block 47 multiplies every calculated difference bythe selected coefficient to get a corrective value. The multiplicationblock 47 informs the output control block 48 of every corrective value.

Only in the presence of the correction command given by the agreementdetection block 46, the output control block 48 generates a correctivedigital signal representing the corrective values. The correctivedigital signal is fed to the adder 5 (see FIG. 2).

In more detail, the extreme-value detection block 41 compares the valuerepresented by every sample in the input digital audio signal with thevalue represented by an immediately-preceding sample therein to decidethe sample value is increasing or decreasing. Data representing theresults of the decision are stored in a memory. By referring to thedecision results, the extreme-value detection block 41 detects everymaximum-representing sample at which the sample value changes from anincreasing state to a decreasing state. The extreme-value detectionblock 41 detects the maximum value VMAX represented by every detectedmaximum-representing sample. By referring to the decision results, theextreme-value detection block 41 detects every minimum-representingsample at which the sample value changes from a decreasing state to anincreasing state. The extreme-value detection block 41 detects theminimum value VMIN represented by every detected minimum-representingsample.

With reference to FIG. 4, the frequency detection block 42 countssamples between every maximum-representing sample and animmediately-preceding minimum-representing sample. The count resultcorresponds to the time interval between the maximum-representing sampleand the immediately-preceding minimum-representing sample. Similarly,the frequency detection block 42 counts samples between everyminimum-representing sample and an immediately-precedingmaximum-representing sample. The count result corresponds to the timeinterval between the minimum-representing sample and theimmediately-preceding maximum-representing sample. The frequencydetection block 42 calculates, from the latest count result, the presentaudio frequency (present local audio frequency) “f” represented by theinput digital audio signal. The frequency detection block 42 informs theagreement detection block 46 of the present audio frequency “f”.

With reference to FIG. 5, the difference detection block 43 calculatesthe difference ΔD1 between every maximum value VMAX and a valuerepresented by a sample immediately preceding the maximum-representingsample. Similarly, the difference detection block 43 calculates thedifference ΔD2 between every minimum value VMIN and a value representedby a sample immediately preceding the minimum-representing sample. Thedifference detection block 43 informs the multiplication block 47 of thecalculated differences ΔD1 and ΔD2.

One is selected from the predetermined frequency bands in the frequencyband table 44 in response to the control signal fed from the frequencyband selector 7. The selected frequency band is denoted by the referencecharacter “fB”. By operating the frequency band selector 7, the user candecide which of the predetermined frequency bands should be selected.The selected frequency band fB is notified to the agreement detectionblock 46.

One is selected from the predetermined coefficients in the coefficienttable 45 in response to the control signal fed from the coefficientselector 8. The selected coefficient is denoted by the referencecharacter “ε”. By operating the coefficient selector 8, the user candecide which of the predetermined coefficients should be selected. Sincethe predetermined coefficients in the coefficient table 45 are in therange between 0 and 1.0 exclusive, the selected coefficient “ε” issmaller than 1.0. The selected coefficient “ε” is notified to themultiplication block 47.

The agreement detection block 46 decides whether or not the presentaudio frequency “f” represented by the input digital audio signal is inthe selected frequency band fB. Only when it is decided that the presentaudio frequency “f” is in the selected frequency band fB, the agreementdetection block 46 generates the correction command. The agreementdetection block 46 informs the output control block 48 of the generatedcorrection command.

The multiplication block 47 multiplies every calculated difference ΔD1by the selected coefficient “ε” to get a corrective value α1. Similarly,the multiplication block 47 multiplies every calculated difference ΔD2by the selected coefficient “ε” to get a corrective value α2. Since theselected coefficient “ε” is smaller than 1.0, the corrective value α1 issmaller than the difference ΔD1. Also, the corrective value α2 issmaller than the difference ΔD2. The multiplication block 47 informs theoutput control block 48 of the corrective values α1 and α2.

Only in the presence of the correction command given by the agreementdetection block 46, the output control block 48 feeds a correctivedigital signal representative of every corrective value α1 to the adder5 (see FIG. 2) at a timing when a corresponding maximum-representingsample in the delay-result digital audio signal reaches the adder 5.Thus, as shown in FIG. 6, the device 5 adds the corrective value α1 toonly the corresponding maximum value in the audio waveform representedby the delay-result digital audio signal. Accordingly, the maximum valueor the maximum-representing sample is corrected. The output controlblock 48 inverts every corrective value α2 into negative one −α2. Onlyin the presence of the correction command given by the agreementdetection block 46, the output control block 48 feeds a correctivedigital signal representative of every corrective value −α2 to the adder5 (see FIG. 2) at a timing when a corresponding minimum-representingsample in the delay-result digital audio signal reaches the adder 5.Thus, as shown in FIG. 7, the adder 5 subtracts the corrective value α2from only the corresponding minimum value in the audio waveformrepresented by the delay-result digital audio signal. Accordingly, theminimum value or the minimum-representing sample is corrected.

The above-mentioned operation steps are iterated. The addition of thecorrective values to the corresponding maximum values and thesubtraction of the corrective values α2 from the corresponding minimumvalues provide enhanced reality and clarity of audio contentsrepresented by the output digital audio signal. Preferably, thepredetermined frequency bands in the frequency band table 44 and thepredetermined coefficients in the coefficient table 45 are set toexperimentally-decided optimal ones.

With reference to FIG. 8, the input digital audio signal has a sequenceof samples representing signal levels or signal values which vary assteps BB. There are 4 samples in a time interval 4 PSA equal to 4 timesone sampling period PSA related to the input digital audio signal. Theinput digital audio signal represents an effective audio waveform AA. Aspreviously mentioned, corrective values α1 are added to correspondingmaximum values in the effective audio waveform AA. Corrective values α2are subtracted from corresponding minimum values in the effective audiowaveform AA. The output digital audio signal which results from thecorrective-value addition and subtraction represents an effective audiowaveform CC. The effective audio waveform CC has emphasized peaks andvalleys relative to those in the original effective audio waveform AA.

It should be noted that the output control block 48 may notify everycorrective value α2 to the adder 5 as it is. In this case, the adder 5is replaced by an adding and subtracting device which functions to addevery corrective value α1 to a corresponding maximum value, and tosubtract every corrective value α2 from a corresponding minimum value.

At least a part of the waveform shaping circuit 1 may be formed by amicroprocessor unit (MPU), a digital signal processor (DSP), or asimilar device which operates in accordance with a control program (acomputer program) stored in its internal memory. FIG. 9 is a flowchartof a segment of the control program. Basically, the program segment isrepetitively executed.

As shown in FIG. 9, a first step 101 of the program segment delays theinput digital audio signal by a predetermined time to get a delay-resultdigital audio signal. The step 101 corresponds to the delay circuit 3(see FIG. 2).

A step 102 following the step 101 compares the value represented byevery sample Dn in the input digital audio signal with the valuerepresented by an immediately-preceding sample Dn−1 therein to decidethe sample value is increasing or decreasing. By referring to thedecision results, the step 102 detects every maximum-representing sampleat which the sample value changes from an increasing state to adecreasing state. The step 102 detects the maximum value VMAXrepresented by every detected maximum-representing sample. By referringto the decision results, the step 102 detects every minimum-representingsample at which the sample value changes from a decreasing state to anincreasing state. The step 102 detects the minimum value VMINrepresented by every detected minimum-representing sample.

A step 103 subsequent to the step 102 counts samples between everymaximum-representing sample and an immediately-precedingminimum-representing sample. Similarly, the step 103 counts samplesbetween every minimum-representing sample and an immediately-precedingmaximum-representing sample. The step 103 calculates, from the latestcount result, the present audio frequency (present local audiofrequency) “f” represented by the input digital audio signal.

A step 104 following the step 103 calculates the difference ΔD1 betweenevery maximum value VMAX and a value represented by a sample immediatelypreceding the maximum-representing sample. Similarly, the step 104calculates the difference ΔD2 between every minimum value VMIN and avalue represented by a sample immediately preceding theminimum-representing sample.

A step 105 subsequent to the step 104 selects one from the predeterminedfrequency bands in the frequency band table 44 (see FIG. 3) in responseto the control signal fed from the frequency band selector 7. Theselected frequency band is denoted by the reference character “fB”. Thestep 105 selects one from the predetermined coefficients in thecoefficient table 45 (see FIG. 3) in response to the control signal fedfrom the coefficient selector 8. The selected coefficient is denoted bythe reference character “ε”.

A step 106 following the step 105 decides whether or not the presentaudio frequency “f” represented by the input digital audio signal is inthe selected frequency band fB. Only when it is decided that the presentaudio frequency “f” is in the selected frequency band fB, the step 106multiplies every calculated difference ΔD1 by the selected coefficient“ε” to get a corrective value α1. Similarly, only when it is decidedthat the present audio frequency “f” is in the selected frequency bandfB, the step 106 multiplies every calculated difference ΔD2 by theselected coefficient “ε” to get a corrective value α2.

A step 107 subsequent to the step 106 adds the corrective value α1 toonly the corresponding maximum value in the audio waveform representedby the delay-result digital audio signal. The step 107 subtracts thecorrective value α2 from only the corresponding minimum value in theaudio waveform represented by the delay-result digital audio signal.After the step 107, the current execution cycle of the program segmentends.

In the correction of the input digital audio signal into the outputdigital audio signal, only maximum values and minimum values in theaudio waveform represented by the input digital audio signal are changedor corrected. This featuring function provides enhanced reality andclarity of audio contents represented by the output digital audiosignal.

It should be noted that the apparatus of FIG. 2 may be provided in apersonal computer or a mobile telephone device. In this case, thecontrol program for the waveform shaping circuit 1 or thehigh-frequency-signal generator 4 is stored in a memory within thepersonal computer or the mobile telephone device. Preferably, thecontrol program is previously stored in the memory. The control programmay be downloaded into the memory via a communication network such asthe Internet.

SECOND EMBODIMENT

FIG. 10 shows a digital-audio-signal processing apparatus according to asecond embodiment of this invention. The apparatus of FIG. 10 is similarto the apparatus of FIG. 2 except for design changes mentionedhereafter.

The apparatus of FIG. 10 includes a signal processing device 201, and aninput device 202 connected with the signal processing device 201. Thesignal processing device 201 includes a digital signal processor or asimilar device which has a combination of an input/output (I/O) port203, a CPU 204, a ROM 205, and a RAM 206. The signal processing device201 operates in accordance with a control program (a computer program)stored in the ROM 205 or the RAM 206.

In the signal processing device 201, the ROM 205 or the RAM 206 storesdata indicating a plurality of predetermined frequency bands differentfrom each other, and also data indicating a plurality of predeterminedcoefficients different from each other. The predetermined coefficientsare between 0 and 1.0 exclusive.

The input device 202 includes first and second switches which can beoperated by a user. The first switch is designed to generate a firstcontrol signal SA for selecting one from the predetermined frequencybands. The selected frequency band can be changed by operating the firstswitch. The second switch is designed to generate a second controlsignal SB for selecting one from the predetermined coefficients. Theselected coefficient can be changed by operating the second switch. Theinput device 202 feeds the first and second control signals SA and SB tothe input/output port 203 in the signal processing device 201.

The signal processing device 201 receives an input digital audio signalhaving a sequence of samples. The input digital audio signal relates toa predetermined sampling frequency and a predetermined quantization bitnumber. The signal processing device 201 converts or processes the inputdigital audio signal into an output digital audio signal in response tothe first and second control signals SA and SB. The signal conversion bythe signal processing device 201 is designed so that extremes (peaks andvalleys, or local maximums and minimums) in the audio waveformrepresented by the output digital audio signal can be emphasizedrelative to those in the audio waveform represented by the input digitalaudio signal. The signal processing device 201 transmits the outputdigital audio signal to an external device. During the processing of theinput digital audio signal by the signal processing device 201, at leasta predetermined number of successive samples in the input digital audiosignal are stored in the RAM 206 on a first-in first-out basis. Theinput/output port 203 receives the input digital audio signal, andtransmits the output digital audio signal to the external device.

As previously mentioned, the signal processing device 201 operates inaccordance with a control program. FIG. 11 is a flowchart of a segmentof the control program which is executed each time a sample in the inputdigital audio signal arrives at the signal processing device 201 (theinput/output port 203).

With reference to FIG. 11, a first step 251 of the program segmentsubtracts the value SV(0) represented by the current sample S(0) fromthe value SV(−1) represented by the sample S(−1) immediately precedingthe current sample S(0) to get a current inter-sample difference SD(0).The step 251 stores information about the current inter-sampledifference SD(0) into the RAM 206 for later use.

A step 252 following the step 251 accesses the RAM 206, and retrievesinformation about the inter-sample difference SD(−1) immediatelypreceding the current one SD(0). The step 251 decides whether or not thesign of the current inter-sample difference SD(0) is opposite to that ofthe immediately-preceding inter-sample difference SD(−1). When the signof the current inter-sample difference SD(0) is opposite to that of theimmediately-preceding inter-sample difference SD(−1), the programadvances from the step 252 to a step 253. Otherwise, the programadvances from the step 252 to a step 265.

The step 253 regards the immediately-preceding sample S(−1) as thelatest extreme-representing sample. The step 253 stores informationabout the latest extreme-representing sample into the RAM 206 for lateruse. The step 253 accesses the RAM 206, and retrieves information aboutthe second latest extreme-representing sample (the extreme-representingsample immediately preceding the latest extreme-representing sample).The step 253 counts samples between the latest extreme-representingsample and the second latest extreme-representing sample. The countresult corresponds to half the current local audio period represented bythe input digital audio signal. The step 253 calculates, from the countresult, the current local audio frequency represented by the inputdigital audio signal.

A step 254 following the step 253 selects one from the predeterminedfrequency bands in response to the first control signal SA.

A step 255 subsequent to the step 254 decides whether or not the presentlocal audio frequency of the input digital audio signal is in theselected frequency band. When the present local audio frequency is inthe selected frequency band, the program advances from the step 255 to astep 256. Otherwise, the program advances from the step 255 to the step265.

The step 256 selects one from the predetermined coefficients in responseto the second control signal SB.

A step 257 following the step 256 multiplies the immediately-precedinginter-sample difference SD(−1) by the selected coefficient to get acorrective value “α”.

A step 258 subsequent to the step 257 decides whether the sample valueSV(−1) is maximum or minimum by referring to the sign of the currentinter-sample difference SD(0). When the sample value SV(−1) is minimum,the program advances from the step 258 to a step 259. On the other hand,when the sample value SV(−1) is maximum, the program advances from thestep 258 to a step 260.

The step 259 shifts the sample value SV(−1) in the negative-goingdirection by an amount corresponding to the corrective value “α” to geta correction-result minimum value CRMIN. The step 259 corrects theoriginal sample S(−1) to represent the correction-result minimum valueCRMIN. Thus, the step 259 changes the original minimum-representingsample S(−1) into correction-result one representative of an emphasizedminimum. The step 259 transmits the correction-resultminimum-representing sample S(−1) from the signal processing device 201as a sample of the output digital audio signal. After the step 259, thecurrent execution cycle of the program segment ends.

The step 260 shifts the sample value SV(−1) in the positive-goingdirection by an amount corresponding to the corrective value “α” to geta correction-result maximum value CRMAX. The step 260 corrects theoriginal sample S(−1) to represent the correction-result maximum valueCRMAX. Thus, the step 260 changes the original maximum-representingsample S(−1) into correction-result one representing an emphasizedmaximum. The step 260 transmits the correction-resultmaximum-representing sample S(−1) from the signal processing device 201as a sample of the output digital audio signal. After the step 260, thecurrent execution cycle of the program segment ends.

The step 265 keeps the immediately-preceding sample S(−1) unchanged. Thestep 265 transmits the immediately-preceding sample S(−1) from thesignal processing device 201 as a sample of the output digital audiosignal. After the step 265, the current execution cycle of the programsegment ends.

ADVANTAGES PROVIDED BY THE INVENTION

In the correction of the input digital audio signal into the outputdigital audio signal, only maximum values and minimum values in theaudio waveform represented by the input digital audio signal are changedor corrected. This featuring function provides enhanced reality andclarity of audio contents represented by the output digital audiosignal.

It is possible to add high-audio-frequency signal components to onlycomponents of the input digital audio signal which represent audiofrequencies in one selected from the predetermined frequency bands.

1. A method of processing a digital audio signal having a sequence ofsamples, the method comprising the steps of: detecting extreme values inan audio waveform represented by the digital audio signal, the detectedextreme values including a detected maximum value and a detected minimumvalue; counting samples between a sample corresponding to first one ofthe detected extreme values and a sample corresponding to second one ofthe detected extreme values to get a count result; detecting an audiofrequency represented by the digital audio signal in response to thecount result; calculating a difference between each of the detectedextreme values and a value of a sample which immediately precedes asample corresponding to the present detected extreme value; selectingone from predetermined frequency bands different from each other;selecting one from predetermined coefficients different from each other;multiplying the calculated differences by the selected coefficient toget corrective values respectively; deciding whether or not the detectedaudio frequency represented by the digital audio signal is in theselected frequency band; and when it is decided that the detected audiofrequency is in the selected frequency band, adding, to the detectedmaximum value, corresponding one of the corrective values, andsubtracting, from the detected minimum value, corresponding one of thecorrective values.
 2. A method as recited in claim 1, wherein thepredetermined coefficients are smaller than 1.0.
 3. An apparatus forprocessing a digital audio signal having a sequence of samples, theapparatus comprising: means for detecting extreme values in an audiowaveform represented by the digital audio signal, the detected extremevalues including a detected maximum value and a detected minimum value;means for counting samples between a sample corresponding to first oneof the detected extreme values and a sample corresponding to second oneof the detected extreme values to get a count result; means fordetecting an audio frequency represented by the digital audio signal inresponse to the count result; means for calculating a difference betweeneach of the detected extreme values and a value of a sample whichimmediately precedes a sample corresponding to the present detectedextreme value; means for selecting one from predetermined frequencybands different from each other; means for selecting one frompredetermined coefficients different from each other; means formultiplying the calculated differences by the selected coefficient toget corrective values respectively; means for deciding whether or notthe detected audio frequency represented by the digital audio signal isin the selected frequency band; and means for, when it is decided thatthe detected audio frequency is in the selected frequency band, adding,to the detected maximum value, corresponding one of the correctivevalues, and subtracting, from the detected minimum value, correspondingone of the corrective values.
 4. An apparatus as recited in claim 3,wherein the predetermined coefficients are smaller than 1.0.
 5. Acomputer readable memory storing a computer program for enabling acomputer to execute steps of processing a digital audio signal having asequence of samples, the steps comprising: detecting extreme values inan audio waveform represented by the digital audio signal, the detectedextreme values including a detected maximum value and a detected minimumvalue; counting samples between a sample corresponding to first one ofthe detected extreme values and a sample corresponding to second one ofthe detected extreme values to get a count result; detecting an audiofrequency represented by the digital audio signal in response to thecount result; calculating a difference between each of the detectedextreme values and a value of a sample which immediately precedes asample corresponding to the present detected extreme value; selectingone from predetermined frequency bands different from each other;selecting one from predetermined coefficients different from each other;multiplying the calculated differences by the selected coefficient toget corrective values respectively; deciding whether or not the detectedaudio frequency represented by the digital audio signal is in theselected frequency band; and when it is decided that the detected audiofrequency is in the selected frequency band, adding, to the detectedmaximum value, corresponding one of the corrective values, andsubtracting, from the detected minimum value, corresponding one of thecorrective values.
 6. An apparatus for processing a digital audiosignal, comprising: first means for detecting an extreme in an audiowaveform represented by the digital audio signal; second means fordetecting a local audio frequency represented by the digital audiosignal; third means for deciding whether or not the local audiofrequency detected by the second means is in a limited frequency band;fourth means for, when the third means decides that the local audiofrequency is in the limited frequency band, emphasizing the extremedetected by the first means; fifth means for, when the third meansdecides that the local audio frequency is not in the limited frequencyband, keeps unchanged the extreme detected by the first means; and sixthmeans for keeping unchanged the audio waveform except for the extreme.7. An apparatus as recited in claim 6, further comprising seventh meansfor changing the limited frequency band.
 8. An apparatus as recited inclaim 6, further comprising seventh means for changing a degree of theemphasis by the fourth means.